/*
 *  AccelerationConversions.c
 *  Podcopter
 *
 *  Created by Aaron Thompson on 2/23/10.
 *  Copyright 2010 Vanderbilt University. All rights reserved.
 *
 */

#include "AccelerationConversions.h"
#include <math.h>

double calculatePitch(double x, double y, double z) {
	return 180.0/M_PI * atan(y / sqrt(x*x + z*z));
}

double calculateRoll(double x, double y, double z) {
	return 180.0/M_PI * atan(x / sqrt(y*y + z*z));
}
